//
//  ZCOrderListBodyItemCell.m
//  ZCJZ
//
//  Created by sujeking on 2019/3/2.
//  Copyright © 2019年 jeking. All rights reserved.
//

#import "ZCOrderListBodyItemCell.h"
#import <UIImageView+WebCache.h>
@interface ZCOrderListBodyItemCell()
@property (weak, nonatomic) IBOutlet UIImageView *imv;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *subLabel;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
@property (weak, nonatomic) IBOutlet UILabel *numLabel;
@property (weak, nonatomic) IBOutlet UILabel *recevLabel;

@end


@implementation ZCOrderListBodyItemCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

- (void)setDict:(NSDictionary *)dict {
    _dict = dict;
    
    [self.imv sd_setImageWithURL:[NSURL URLWithString:[dict valueForKey:@"goods_thumb"]] placeholderImage:[UIImage imageNamed:@"picon"] options:SDWebImageAllowInvalidSSLCertificates];
    self.nameLabel.text = [dict valueForKey:@"goods_name"];
    self.subLabel.text = [dict valueForKey:@"sku_properties_name"];
    self.priceLabel.text = [NSString stringWithFormat:@"￥%.2f",[[dict valueForKey:@"shop_price"] floatValue]];
    self.numLabel.text = [NSString stringWithFormat:@"x%zd",[[dict valueForKey:@"nums"] integerValue]];
}

- (void)setRecever:(NSArray *)recever {
    _recever = recever;
    self.recevLabel.text = [NSString stringWithFormat:@"收货人:%@(%@)",recever.firstObject,recever.lastObject];
}

@end
